/**
* 全局配置信息， 包含网站标题，  动态组件定义
*
* @author terrfly
* @site https://www.jeepay.vip
* @date 2021/5/8 07:18
*/

/** 应用配置项 **/
export default {
  APP_TITLE: 'Jeepay商户系统', // 设置浏览器title
  ACCESS_TOKEN_NAME: 'iToken' // 设置请求token的名字， 用于请求header 和 localstorage中存在名称
}

let App

export function getGlobalApp() {
  return App
}

export function setGlobalApp(app) {
  App = app
}

/**
 * 与后端开发人员的路由名称及配置项
 * 组件名称 ：{ 默认跳转路径（如果后端配置则已动态配置为准）， 组件渲染 }
 * */
export const asyncRouteDefine = {
  'NoticeInfoPage': { defaultPath: '/notices', component: () => import('@/views/current/postList.vue') }, // 公告列表
  'CurrentUserInfo': { defaultPath: '/current/userinfo', component: () => import('@/views/current/UserinfoPage.vue') }, // 用户设置
  'AdvertInfoPage': { defaultPath: '/advert', component: () => import('@/views/sys/advert/Advert.vue')  }, // 广告配置

  'MainPage': { defaultPath: '/main', component: () => import('@/views/dashboard/Analysis.vue') },
  'SysUserPage': { defaultPath: '/users', component: () => import('@/views/sysuser/SysUserPage.vue') },
  'RolePage': { defaultPath: '/roles', component: () => import('@/views/role/RolePage.vue') },
  'MchInfoPage' : { defaultPath: '/info', component: () => import('@/views/info/MchInfoPage.vue') },  // 商户信息
  'MchAppPage': { defaultPath: '/apps', component: () => import('@/views/mchApp/List.vue') }, // 商户应用列表
  'MchQrCodePage': { defaultPath: '/mchQrCodes', component: () => import('@/views/qrcode/List.vue') }, // 商户应用列表
  'PayTestPage': { defaultPath: '/paytest', component: () => import('@/views/payTest/PayTest.vue') }, // 支付测试
  'CashierUrlPage': { defaultPath: '/cashierUrl', component: () => import('@/views/cashierUrl/CashierUrl.vue') }, // 收银台地址
  'MchTransferPage': { defaultPath: '/doTransfer', component: () => import('@/views/transfer/MchTransferPage.vue') }, // 转账

  'PayOrderListPage': { defaultPath: '/payOrder', component: () => import('@/views/order/pay/PayOrderList.vue') }, // 支付订单列表
  'RefundOrderListPage': { defaultPath: '/refundOrder', component: () => import('@/views/order/refund/RefundOrderList.vue') }, // 退款订单列表
  'TransferOrderListPage': { defaultPath: '/transferOrder', component: () => import('@/views/order/transfer/TransferOrderList.vue') }, // 转账订单

  'DivisionReceiverGroupPage': { defaultPath: '/divisionReceiverGroup', component: () => import('@/views/division/group/DivisionReceiverGroupPage.vue') }, // 分账账号组管理
  'DivisionReceiverPage': { defaultPath: '/divisionReceiver', component: () => import('@/views/division/receiver/DivisionReceiverPage.vue') }, // 分账账号管理
  'DivisionRecordPage': { defaultPath: '/divisionRecord', component: () => import('@/views/division/record/DivisionRecordPage.vue') }, // 分账记录
  'DivisionRefundRecordPage': { defaultPath: '/divisionRecord', component: () => import('@/views/division/refund/DivisionRefundRecordPage.vue') }, // 分账回退记录
  'StorePage': { defaultPath: '/store', component: () => import('@/views/store/StorePage.vue') }, // 商户门店管理
  'NoticePage': { defaultPath: '/notice', component: () => import('@/views/notice/NoticePage.vue') }, // 通知配置
  'MchConfigPage': { defaultPath: '/config', component: () => import('@/views/mchconfig/MchConfig.vue') }, // 系统配置

  'SpeakerPage': { defaultPath: '/speaker', component: () => import('@/views/device/speaker/List.vue')  }, // 云喇叭管理
  'PrinterPage': { defaultPath: '/printer', component: () => import('@/views/device/printer/List.vue')  }, // 云打印管理
  'PosPage': { defaultPath: '/pos', component: () => import('@/views/device/pos/List.vue')  }, // 扫码POS
  'PluginCdKeyPage': { defaultPath: '/plugin/cdkey', component: () => import('@/views/device/plugin/CdKeyList.vue')  }, // 收银插件激活码管理
  'AutoPosPage': { defaultPath: '/auto/pos', component: () => import('@/views/device/autopos/AutoPosList.vue')  }, // 智能POS
  'FaceAppPage': { defaultPath: '/face', component: () => import('@/views/device/faceapp/FaceAppList.vue')  }, // 刷脸APP管理
  'RuyiPage': { defaultPath: '/ruyi', component: () => import('@/views/device/ruyi/RuyiList.vue')  }, // 如意Lite管理

  'MchApplymentListPage': { defaultPath: '/applyments', component: () => import('@/views/applyment/MchApplymentList.vue')  }, // 进件

  'StatisticStorePage': { defaultPath: '/statistic/store', component: () => import('@/views/statistic/store/List.vue') }, // 门店
  'StatisticWayPage': { defaultPath: '/statistic/way', component: () => import('@/views/statistic/way/List.vue') }, // 支付方式
  'StatisticTypePage': { defaultPath: '/statistic/type', component: () => import('@/views/statistic/type/List.vue') }, // 支付类型
  'TransactionPage': { defaultPath: '/statistic/transaction', component: () => import('@/views/statistic/transaction/List.vue') }, // 交易报表
  'TerminalPage': { defaultPath: '/cashouts', component: () => import('@/views/terminal/TerminalPage.vue') }, // 终端管理

  'DeviceCountPage': { defaultPath: '/statistic/device', component: () => import('@/views/statistic/device/List.vue') }, // 设备统计

  'MemberConfigPage': { defaultPath: '/member/config', component: () => import('@/views/member/config/MemberConfigPage.vue') }, // 会员配置
  'MemberPage': { defaultPath: '/member/memberInfo', component: () => import('@/views/member/memberInfo/MemberPage.vue') }, // 会员管理
  'RechargeRulePage': { defaultPath: '/member/rechargeRule', component: () => import('@/views/member/rechargeRule/RechargeRulePage.vue') }, // 会员充值规则
  'MemberAccountPage': { defaultPath: '/member/account', component: () => import('@/views/member/account/MemberAccountPage.vue') }, // 会员账户流水
  'MemberRechargePage': { defaultPath: '/member/recharge', component: () => import('@/views/member/recharge/MemberRechargePage.vue') }, // 会员充值记录

}
